#include <stdafx.h>

class dmetaphoneword
{
public:
	~dmetaphoneword();
	BYTE *word;
	ULONG location;
	ULONG length;
	BOOL IsSlavoGermanic;
	void AddChar(BYTE c);
	bool dmetaphoneword::SlavoGermanic();
	void dmetaphoneword::InitializeIn (BYTE *wordin, ULONG len);
	void InitializeOut (ULONG len);
};

class dmetaphone {
public:
	dmetaphoneword inword, outword1, outword2;
	void dmetaphone::CheckStart (dmetaphoneword &inword, dmetaphoneword &outword1, dmetaphoneword &outword2);
	void dmetaphone::Convert (dmetaphoneword &inword, dmetaphoneword &outword1, dmetaphoneword &outword2);
	void dmetaphone::Encode (dmetaphoneword &inword, dmetaphoneword &outword1, dmetaphoneword &outword2);
private:
	void dmetaphone::UpperCaseWord (BYTE *word, ULONG length);
	bool dmetaphone::IsAlpha (BYTE c);
	bool dmetaphone::IsVowel (BYTE c);
	bool dmetaphone::IsConsonant (BYTE c);
};
